package com.emm.yixun.common.model;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.emm.yixun.common.model.enums.ProjectTypeEnum;
import org.apache.commons.lang.StringUtils;

public class ProjectList {
	private Long id;
	private String projectName;
	private String projectType;
	private Date updateTime;
	private Integer premisesCount;
	private Integer buildingCount;
	private Integer unitCount;
	private Integer roomCount;
	private String areaFullName;
	//总经理
	private String generalManagerName;
	//项目总
	private String projectLeaderName;
	//经济总
	private String saleLeaderName;
	//销售经理
	private String fieldLeaderName;
	//财务经理
	private String financeLeaderName;
	//销管经理
	private String maLeaderName;
	//区域领导
	private String areaLeaderName;
	//区域经理
	private String areaManagerName;

	private String updateTimeStr;
	private String projectTypeName;
	
	private String bindReceivables;
	//推广名
	private String promotName;
	private String pmoPush;
	
	

	/**
	 * bindReceivables.
	 *
	 * @return  the bindReceivables
	 * @since   JDK 1.6
	 */
	public String getBindReceivables() {
	    return bindReceivables;
	}

	/**
	 * bindReceivables.
	 *
	 * @param   bindReceivables    the bindReceivables to set
	 * @since   JDK 1.6
	 */
	public void setBindReceivables(String bindReceivables) {
	    this.bindReceivables = bindReceivables;
	}

	public String getPromotName() {
		return promotName;
	}

	public void setPromotName(String promotName) {
		this.promotName = promotName;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getProjectType() {
		return projectType;
	}

	public void setProjectType(String projectType) {
		this.projectType = projectType;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getPremisesCount() {
		return premisesCount;
	}

	public void setPremisesCount(Integer premisesCount) {
		this.premisesCount = premisesCount;
	}

	public Integer getBuildingCount() {
		return buildingCount;
	}

	public void setBuildingCount(Integer buildingCount) {
		this.buildingCount = buildingCount;
	}

	public Integer getUnitCount() {
		return unitCount;
	}

	public void setUnitCount(Integer unitCount) {
		this.unitCount = unitCount;
	}

	public Integer getRoomCount() {
		return roomCount;
	}

	public void setRoomCount(Integer roomCount) {
		this.roomCount = roomCount;
	}

	public String getAreaFullName() {
		return areaFullName;
	}

	public void setAreaFullName(String areaFullName) {
		this.areaFullName = areaFullName;
	}

	public String getGeneralManagerName() {
		return generalManagerName;
	}

	public void setGeneralManagerName(String generalManagerName) {
		this.generalManagerName = generalManagerName;
	}

	public String getProjectLeaderName() {
		return projectLeaderName;
	}

	public void setProjectLeaderName(String projectLeaderName) {
		this.projectLeaderName = projectLeaderName;
	}

	public String getSaleLeaderName() {
		return saleLeaderName;
	}

	public void setSaleLeaderName(String saleLeaderName) {
		this.saleLeaderName = saleLeaderName;
	}

	public String getFieldLeaderName() {
		return fieldLeaderName;
	}

	public void setFieldLeaderName(String fieldLeaderName) {
		this.fieldLeaderName = fieldLeaderName;
	}

	public String getFinanceLeaderName() {
		return financeLeaderName;
	}

	public void setFinanceLeaderName(String financeLeaderName) {
		this.financeLeaderName = financeLeaderName;
	}

	public String getMaLeaderName() {
		return maLeaderName;
	}

	public void setMaLeaderName(String maLeaderName) {
		this.maLeaderName = maLeaderName;
	}

	public String getUpdateTimeStr() {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		try {
			return updateTime==null?"":sdf.format(updateTime);
		} catch (Exception e) {
			e.printStackTrace();
			return "";
		}
	}

	public void setUpdateTimeStr(String updateTimeStr) {
		this.updateTimeStr = updateTimeStr;
	}

	public String getProjectTypeName() {
		if(null!=projectType && !"".equals(projectType)){
			String[] pt=projectType.split(",");
			String projectTypeEnumName="";
			for(String pte : pt){
				if(StringUtils.isNotEmpty(projectTypeEnumName)){
					projectTypeEnumName=projectTypeEnumName+",";
					projectTypeEnumName=projectTypeEnumName+ProjectTypeEnum.getByNo(pte).getDes();
				}
			}
			return projectTypeEnumName;
		}
		return "";
		
	}

	public void setProjectTypeName(String projectTypeName) {
		this.projectTypeName = projectTypeName;
	}
	
	
	public String getAreaLeaderName() {
		return areaLeaderName;
	}

	public void setAreaLeaderName(String areaLeaderName) {
		this.areaLeaderName = areaLeaderName;
	}

	public String getAreaManagerName() {
		return areaManagerName;
	}

	public void setAreaManagerName(String areaManagerName) {
		this.areaManagerName = areaManagerName;
	}

	public String getPmoPush() {
		return pmoPush;
	}

	public void setPmoPush(String pmoPush) {
		this.pmoPush = pmoPush;
	}
}
